package sac.modelo.data.maestros;

/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: 
 * License Type: Evaluation
 */
import java.io.Serializable;
import javax.persistence.*;

import sac.modelo.data.transacciones.CompraCabrito;
import sac.modelo.data.transacciones.Parto;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="Cabriton")
public class Cabriton implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Cabriton() {
	}
	
	@Column(name="numero", nullable=false)	
	@Id		
	private int numero;
	
	@ManyToOne(targetEntity=Parto.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="Partoid_parto", referencedColumnName="id_parto") })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	private Parto partoid_parto;
	
	@ManyToOne(targetEntity=Animal.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="Animalid_animal", referencedColumnName="id_animal", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	private Animal animalid_animal;
	
	@OneToOne(targetEntity=CompraCabrito.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="Compra_Cabritoid_compra") })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	private CompraCabrito compra_Cabritoid_compra;
	
	@Column(name="id_vendedor", nullable=true)	
	private Integer id_vendedor;
	
	@Column(name="estatus", nullable=false)	
	private boolean estatus;
	
	private void setNumero(int value) {
		this.numero = value;
	}
	
	public int getNumero() {
		return numero;
	}
	
	public int getORMID() {
		return getNumero();
	}
	
	public void setId_vendedor(int value) {
		setId_vendedor(new Integer(value));
	}
	
	public void setId_vendedor(Integer value) {
		this.id_vendedor = value;
	}
	
	public Integer getId_vendedor() {
		return id_vendedor;
	}
	
	public void setEstatus(boolean value) {
		this.estatus = value;
	}
	
	public boolean getEstatus() {
		return estatus;
	}
	
	public void setPartoid_parto(Parto value) {
		this.partoid_parto = value;
	}
	
	public Parto getPartoid_parto() {
		return partoid_parto;
	}
	
	public void setAnimalid_animal(Animal value) {
		this.animalid_animal = value;
	}
	
	public Animal getAnimalid_animal() {
		return animalid_animal;
	}
	
	public void setCompra_Cabritoid_compra(CompraCabrito value) {
		this.compra_Cabritoid_compra = value;
	}
	
	public CompraCabrito getCompra_Cabritoid_compra() {
		return compra_Cabritoid_compra;
	}
	
	public String toString() {
		return String.valueOf(getNumero());
	}
	
}
